using UnityEngine;

public class ScoreManager
{
	public static int LastMass
	{
		get
		{
			return PlayerPrefs.GetInt("LastMass", 0);
		}
		set
		{
			PlayerPrefs.SetInt("LastMass", value);
			if (value > BestMass)
			{
				BestMass = value;
			}
		}
	}

	public static int BestMass
	{
		get
		{
			return PlayerPrefs.GetInt("BestMass", 0);
		}
		set
		{
			PlayerPrefs.SetInt("BestMass", value);
			AnalyticManager.SendEvent(AnalyticManager.BestMass, value);
			SocialPlatformsManager.instance.SendHighscore(value);
		}
	}

	public static int LastRank
	{
		get
		{
			return PlayerPrefs.GetInt("LastRank", 1000);
		}
		set
		{
			PlayerPrefs.SetInt("LastRank", value);
			if (value < BestRank)
			{
				BestRank = value;
			}
		}
	}

	public static int BestRank
	{
		get
		{
			return PlayerPrefs.GetInt("BestRank", 1000);
		}
		set
		{
			PlayerPrefs.SetInt("BestRank", value);
		}
	}

	public static float LastSurviveTime
	{
		get
		{
			return PlayerPrefs.GetFloat("LastSurviveTime", 0f);
		}
		set
		{
			PlayerPrefs.SetFloat("LastSurviveTime", value);
			if (value > BestSurviveTime)
			{
				BestSurviveTime = value;
			}
		}
	}

	public static float BestSurviveTime
	{
		get
		{
			return PlayerPrefs.GetFloat("BestSurviveTime", 0f);
		}
		set
		{
			PlayerPrefs.SetFloat("BestSurviveTime", value);
			AnalyticManager.SendEvent(AnalyticManager.BestSurvivalTime, (int)value);
			SocialPlatformsManager.instance.SendBestSurviveTime((int)value);
		}
	}

	public static int LastKill
	{
		get
		{
			return PlayerPrefs.GetInt("LastKill", 0);
		}
		set
		{
			PlayerPrefs.SetInt("LastKill", value);
			if (value > BestKill)
			{
				BestKill = value;
			}
		}
	}

	public static int BestKill
	{
		get
		{
			return PlayerPrefs.GetInt("BestKill", 0);
		}
		set
		{
			PlayerPrefs.SetInt("BestKill", value);
			AnalyticManager.SendEvent(AnalyticManager.BestKillCount, value);
			SocialPlatformsManager.instance.SendKillCount(value);
		}
	}

	public static int TotalKillCount
	{
		get
		{
			return PlayerPrefs.GetInt("TotalKillCount", 0);
		}
		set
		{
			PlayerPrefs.SetInt("TotalKillCount", value);
		}
	}
}
